package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.RoleDao;
import com.sc.highspeed.db.model.RoleModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/12/6.
 */
@Service
public class RoleService {

    @Autowired
    private RoleDao roleDao;

    public List<RoleModel> getRoleList() {
        return roleDao.getRoleList();
    }

    public RoleModel getRoleById(int id) {
        return roleDao.getRoleById(id);
    }

    public int insertRole(RoleModel roleModel) {
        return roleDao.insertRole(roleModel);
    }

    public int updateRoleById(RoleModel roleModel) {
        return roleDao.updateRoleById(roleModel);
    }

    public int deleteRoleById(int id) {
        return roleDao.deleteRoleById(id);
    }
}
